package org.lyl.taobao.dao;

import org.lyl.taobao.api.entity.Commodity;
import org.lyl.taobao.api.entity.ShopCart;

import java.sql.Connection;
import java.util.List;

/**
 * @Author: Re
 * @Date: 2021/4/7 17:32
 */
public interface IShopCartDao {
    /**
     * 添加购物车信息
     * @param connection
     * @param shopCart
     * @return
     */
    boolean addShopCart(Connection connection, ShopCart shopCart);

    /**
     * 根据用户id查询
     * @param connection
     * @param userId
     * @return
     */
    List<Integer> checkC_IdByUserId(Connection connection, Integer userId);

    /**
     * 删除购物车中的商品
     * @param connection
     * @param userId
     * @param c_Id
     * @return
     */
    boolean deleteShopCart(Connection connection,Integer userId,Integer c_Id);
}
